<?php
namespace app\controller;

use app\model\Info;

class StuTest
{
    public  function index(){
        //$stu = Info::find('20201001');
        //$stu = Info::hasWhere('login',['pwd'=>'123'])->select();//查找密码为123的学生信息
        //return json($stu);

        //$stu->login()->save(['pwd'=>'888']);//增加
        //$stu->login->save(['pwd'=>'000']);//修改
        //$stu->login->delete();  //删除

        $stu = Info::find('20201005');
        return json($stu->grade);
    }
}